The present application claims priority from Japanese Patent Application No. 2002-80535, filed on Mar. 22, 2002, which is herein incorporated by reference.
The present invention relates generally to a measurement data fairing method, and more particularly to the improvement of a technique for smoothing contour data.
Measuring machines, such as coordinate measuring machines (form measuring instruments, three-dimensional measuring machines, etc.), are used in order to conduct precise measurement of contour of objects. For instance, with coordinate measuring machines, a measuring surface of a measured object is traced with a probe at a constant sampling pitch and coordinate data of points on the measuring surface are obtained, whereby contour information of the measuring surface is obtained.
In the above-described measuring machines, it is easy for noise to ride on the measurement data due to, for example, the measuring surface being scanned at a fast speed with a probe, the use of a non-contact probe, or disturbances resulting from signals and the like from an electrical systems is input. For this reason, precise contour recognition becomes difficult using raw measurement data as it is.
Thus, conventionally, when conducting contour recognition and the like, raw measurement data is not directly evaluated, but data is evaluated after fairing processing to remove noise components from the waveform of the raw measurement data has been administered to the data.
Conventionally, a method such as the following has been used as the measurement data fairing method. Namely, data of an initial fitting number is first obtained from contour data. Then, a geometrical element, such as a circle or straight line, is fitted to the data. Then, a fitting interval of the element is successively extended from an endpoint of the element within a predetermined range of error with respect to subsequent data (e.g., see Japanese Patent Application Laid-Open Publication (JP-A) No. 11-339052 and JP-A No. 2000-331171).
However, in the above-described conventional method, results of fairing processing of a waveform are easily disturbed by outlier, leaving room for improvement with respect to this point.
Thus, conventionally, a method using digital filter processing has been conceivable. However, when digital filter processing is used, division into plural intervals is necessary in order to minimize contour distortion resulting from the processing. In this division, it is necessary to divide into appropriate portions in accordance with the contour, and it is difficult to conduct versatile processing.
With respect to each of the divided intervals, three-dimensional data must be expanded to two-dimensional constant pitch data to match input of the filter. If the original data becomes an uneven pitch after the expansion, constant pitch processing thereof becomes newly necessary. Also, approximation of the data is conducted by the constant pitch processing. For this reason, the burden with respect to processing is heavy in digital filter processing.
Additionally, because digital filter processing is not enough to satisfy with versatility with respect to the data, it has not come to be adopted as means for solution.
The present invention was conceived in light of the above-described problems of the prior art, and it is an object thereof to provide a measurement data fairing method with which fairing processing of measurement data can be conducted excellently while reducing the burden of the fairing processing of the measurement data.
In order to achieve this object, a measurement data fairing method according to the invention is a measurement data fairing method that fits a geometrical element to measurement data and conducts fairing processing of the measurement data on the basis of a statistic of a residual of the measurement data with respect to the geometrical element, the method comprising a fitting interval determination step, a geometrical element fitting step, an outlier removal step, a statistic computation step, and an invalid data removal step.
In the fitting interval determination step, an interval in which the geometrical element is to be fitted to the measurement data is determined.
In the geometrical element fitting step, interval measurement data in the fitting interval is extracted from the measurement data and the geometrical element is robustly fitted to the extracted interval measurement data.
In the outlier removal step, outlier is removed from the interval measurement data on the basis of the result of the robust fitting conducted by the geometrical element fitting step, and the remaining interval measurement data is used as the interval measurement data.
In the statistic computation step, a statistic of a residual of the interval measurement data after the outlier removal step is computed with respect to the geometrical element fitted in the geometrical element fitting step.
In the invalid data removal step, measurement data that exceeds a predetermined limit value of the statistic of the residual of the measurement data with respect to the geometrical element is removed as invalid data from the interval measurement data after the outlier removal step on the basis of the statistic of the residual computed in the statistic computation step, and the remaining interval measurement data is used as the interval measurement data.
In the invention, it is preferable to successively conduct the geometrical element fitting step, the outlier removal step, the statistic computation step, and the invalid data removal step with respect to a next fitting interval using, as a starting point of the next fitting interval, next data adjacent to an ending point of the interval determined in the fitting interval determination step.
Also, in the invention, it is preferable for the fitting interval determination step to comprise an initial interval setting step, an initial fitting step, and an interval extension step.
In the initial interval setting step, an initial interval of a predetermined data number is set for the measurement data.
In the initial fitting step, initial interval measurement data in the initial interval set in the initial interval setting step is extracted from the measurement data, and the geometrical element is fitted to the extracted initial interval measurement data.
In the interval extension step, the initial interval is extended in a range in which the residual of the measurement data with respect to the geometrical element fitted in the initial fitting step does not exceed a predetermined allowable residual of the measurement data with respect to the geometrical element, and the initial interval is used as the fitting interval of the geometrical element.
Also, in the invention, it is preferable for the fitting interval determination step to comprise an interval number setting step, a moving average step, and a dividing step.
In the interval number setting step, a number of intervals of the measurement data is set.
In the moving average step, a moving average curve of the measurement data is sought.
In the dividing step, the measurement data is divided, on the basis of a result when a length of the moving average curve sought in the moving average step has been divided at the interval number set in the interval number setting step, into the interval number set in the interval number setting step, and the divided intervals are respectively used as the fitting interval.
Also, in the invention, the moving average step preferably comprises an auxiliary data generation step and a computation step.
In the auxiliary data generation step, auxiliary data of at least one of prepositional data prepared at a portion before a starting point of the measurement data and postpositional data prepared after an ending point of the measurement data are generated.
In the computation step, the moving average curve is sought from the measurement data and the auxiliary data.
Also, in the invention, the auxiliary data are preferably generated by mirroring conversion using the starting point or the ending point of the measurement data as a center.
Also, in the invention, when a distance between the starting point and the ending point of the measurement data is within a predetermined distance, the prepositional data are preferably generated using part of the measurement data positioned before the ending point of the measurement data and the postpositional data are preferably generated using part of the measurement data positioned after the starting point of the measurement data.
Also, in the invention, a type of the geometrical element preferably comprises one or two or more types selected from the group consisting of a straight line, a kinked line, and a circular arc.
Also, in the invention, a type of the geometrical element preferably comprises plural geometrical elements.
By xe2x80x9ccomprises plural geometrical elementsxe2x80x9d is meant not only types of elements such a straight line, a kinked line, and a circular arc, but comprising elements whose starting points and directional vectors are different, even if the type of the element is the same straight line.
Moreover, in the invention, a starting point of the fitting geometrical element is preferably present on the geometrical element in an adjacent previous interval.